import {loadRoles} from "@/api/setting/manager"

export default {
    namespaced: true,
    state: {
        roles: [],
    },
    mutations:{
       updateRoles(state,payload){
           state.roles = payload.roles
       }
    },
    actions: {
        load({commit}) {
            loadRoles({pageSize:100}).then(res => {
                commit('updateRoles',{roles:res.list})
            }).catch(error => {

            })
        }
    }
}
